---
title: The endpoint did not return a Response.
i18nReady: true
githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/core/errors/errors-data.ts
---

> **EndpointDidNotReturnAResponse**: An endpoint must return either a `Response`, or a `Promise` that resolves with a `Response`.

## 무엇이 잘못되었나요?
엔드포인트가 아무것도 반환하지 않거나 `Response`가 아닌 객체를 반환할 때 발생합니다.

엔드포인트는 `Response` 또는 `Response`로 resolve되는 `Promise`를 반환해야 합니다. 예를 들어:
```ts
import type { APIContext } from 'astro';

export async function GET({ request, url, cookies }: APIContext): Promise<Response> {
    return Response.json({
        success: true,
        result: 'Data from Astro Endpoint!'
    })
}
```



